package com.zzyy.study.controller;

import com.zzyy.study.annotations.CustomLogAnnotation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther zzyy
 * @create 2024-12-28 12:05
 */
@RestController
public class MyController
{
    @GetMapping("/test")
    @CustomLogAnnotation(value = "This is a test method0923", enable = true)
    public String testMethod()
    {
        // 业务逻辑代码
        String result = "Hello from the annotated method!业务逻辑代码";
        System.out.println("testMethod主业务逻辑");
        return result;
    }

    @GetMapping("/test2")
    public String testMethod2()
    {
        // 业务逻辑代码
        String result = "Hello from the annotated method!2";
        System.out.println("testMethod2主业务逻辑");
        return result;
    }
}
